
MAIN_VERSION = v1.0.0
LOCAL_CFLAGS += -DMAIN_VERSION="\"$(MAIN_VERSION)\""

# GIT version
GIT_VERSION = $(shell git show -s --pretty=format:%h;)
LOCAL_CFLAGS += -DGIT_REVISION="\"$(GIT_VERSION)\""
$(warning "GIT_VERSION  $(GIT_VERSION)")

# build time
COMPILE_TIME = $(shell date +"%Y-%m-%d_%H:%M:%S")
LOCAL_CFLAGS += -DCOMPILE_TIME="\"$(COMPILE_TIME)\""
$(warning "COMPILE_TIME  $(COMPILE_TIME)")

VERSION = $(MAIN_VERSION) $(GIT_VERSION) $(COMPILE_TIME)
LOCAL_CFLAGS += -DVERSION=\"$(MAIN_VERSION)\ $(GIT_VERSION)\ $(COMPILE_TIME)\"
$(warning "VERSION  $(VERSION)")

ifeq ($(TARGET_OS) , android)
	LOCAL_CFLAGS += -DANDROID_OS
else ifeq ($(TARGET_OS), linux)
	LOCAL_CFLAGS += -DLINUX_OS
endif

ifeq ($(PLAN_NAME), $(PLAN_V536))
	LOCAL_CFLAGS += -DPLAN_V536
else ifeq ($(PLAN_NAME), $(PLAN_V833))
	LOCAL_CFLAGS += -DPLAN_V833
endif
